package com.bestcem.xm.label.service.dto;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import org.springframework.util.ObjectUtils;

/**
 * @author ming.xue <ming.xue@idiaoyan.com>
 * @desc 标签值标识
 * @date 2021-06-09
 */
@Getter
@Setter
@NoArgsConstructor
@AllArgsConstructor
public class LabelValueIdDTO {
    /**
     * 标签值标识
     */
    private String id;

    /**
     * 标签标识
     */
    private String labelId;

    @Override
    public int hashCode() {
        return ObjectUtils.nullSafeHashCode(id);
    }

    @Override
    public boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }

        if (!(obj instanceof LabelValueIdDTO)) {
            return false;
        }

        LabelValueIdDTO labelValueIdDTO = (LabelValueIdDTO) obj;
        return ObjectUtils.nullSafeEquals(id, labelValueIdDTO.id);
    }
}
